<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:sec="http://www.similarworld.com/security/tag"
	template="/WEB-INF/templates/template.xhtml">
	<ui:define name="content">

		<h2>Users</h2>
		<table>
			<ui:repeat value="#{userBean.users}" var="v_task">
				<tr>
					<td>#{v_task.username}</td>
					<td>#{v_task.nameSurname}</td>
				</tr>
			</ui:repeat>
		</table>

		<h:form>
			<p:messages autoUpdate="true" />
			<h:panelGrid columns="2">
				<h:outputText value="Name - Surname" />
				<h:inputText value="#{userBean.user.nameSurname}" />
				<h:outputText value="Username" />
				<h:inputText value="#{userBean.user.username}" />
				<h:outputText value="Password" />
				<h:inputText value="#{userBean.user.password}" />
				<h:commandButton action="#{userBean.save}" value="Add" />
			</h:panelGrid>

		</h:form>

	</ui:define>
</ui:composition>
